package com.mshop.web;

import java.util.List;

import com.mshop.fw.modules.SM;
import com.mshop.po.Mobile;
import com.mshop.util.Pagination;
import com.mshop.util.WebContext;

public class IndexAction extends WebAction {

	/**
	 * 2012
	 */
	private static final long serialVersionUID = 1L;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.mshop.web.WebAction#getObjectId()
	 */
	@Override
	public long getObjectId() {
		return 0;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.mshop.web.WebAction#webProcess(com.mshop.util.WebContext)
	 */
	@Override
	public String webProcess(WebContext context) {
		List<Mobile> mobileList = SM.MobileService.list(startRow, pagePerSize);
		context.put("mobileList", mobileList);
		context.put("pagenation", new Pagination(SM.MobileService.getCount()
				.intValue(), startRow, pagePerSize));
		return "index";
	}

}
